package com.zmn.oms.zmn.business.interfaces.acceptance;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.acceptance.OrderWorkAcceptanceDTO;
import com.zmn.oms.model.dto.acceptance.ResultOrderAcceptanceDTO;
import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptance;
import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptanceDbQuery;
import com.zmn.oms.model.entity.work.OrderWork;

import java.util.List;

/**
 * 类描述：验收业务接口
 *
 * @author wangxiaokun
 * @since 2021/09/18 14:23
 */
public interface OrderWorkAcceptanceBService {

    /**
     * 根据验收id查询单个验收详情
     * @param acceptanceId
     * @return
     */
    OrderWorkAcceptance getOrderWorkAcceptanceByAcceptanceIdAndOrderId(Long acceptanceId, Long orderId);

    /**
     * 根据查询条件查询多个订单验收
     * @param query
     * @return
     */
    List<OrderWorkAcceptance> listOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery query);

    /**
     * 新增订单验收
     * @param dto
     */
    ResultOrderAcceptanceDTO addOrderWorkAcceptance(OrderWorkAcceptanceDTO dto) throws OmsBaseException;

    /**
     * 发送验收微信消息
     * @param orderId
     */
    void sendWeChatMessage(Long orderId, Long acceptanceId) throws OmsBaseException;

    /**
     * 修改订单验收
     * @param dto
     */
    void modifyOrderWorkAcceptance(OrderWorkAcceptanceDTO dto) throws OmsBaseException;

    /**
     * 清空尾款验收
     * @param dto
     */
    void clearPaymentAcceptance(OrderWorkAcceptanceDTO dto, OrderWork orderWork);
}
